package com.cool.collect.demo;

import cn.hutool.core.bean.BeanUtil;
import com.cool.collect.entity.User;

import java.util.HashMap;

/**
 * @Author: xiemiao
 * @CreateTime: 2023-03-09  16:06
 * @Description: TODO
 * @Version: 1.0
 */
public class BeanUtilTest {
    public static void main(String[] args) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("name", "nico");
        map.put("new", "88");
        User user = BeanUtil.toBean(map, User.class);
        System.out.println(user);
    }
}
